<?php
include 'inc/config.php';

$basePath = $FRMWK['basePath'];
$context = stream_context_create($FRMWK['options']);

include 'dealerSearchInterface.php';

   if (isset($_POST['system']) == false)
   {
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
	<title>Become A SunMaxx Solar Thermal Dealer / Installer</title>
	<link rel="stylesheet" type="text/css" href="/wp-content/themes/SunMaxxSolar/style.css" />

<link href="/wp-content/themes/SunMaxxSolar/css/dropdown/dropdown.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/wp-content/themes/SunMaxxSolar/css/dropdown/themes/default/default.css" media="screen" rel="stylesheet" type="text/css" />

<!--[if lt IE 7]>
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/jquery/jquery.dropdown.js"></script>
<![endif]-->

<style>

#wrapper-top {
	width: 1060px;
	height: 35px;
	margin-left: auto;
	margin-right: auto;
	margin-top: 0px;
	margin-bottom: 0px;
	background-image: url('wp-content/themes/SunMaxxSolar/images/wrapper-bg-top.jpg');
}

</style>

</head>

<body>

<div id="wrapper-top"></div>

<div id="wrapper">

<?php include ('wp-content/themes/SunMaxxSolar/header-no-wp.php'); ?>

	<div id="container">
    
    	<?php include ('wp-content/themes/SunMaxxSolar/sidebar-no-wp.php'); ?>
    
		<div id="content">


   <div class="dealerLocator">
      <script src="http://www.siliconsolar.com/ff/js/ss_remote.js" type="text/javascript"></script>
      <style type="text/css">
         .dealerLocator {
            width : 100%;
            font-size : 10px;
         }

         .dealerLocator .dealerIntroTable h2, .dealerLocator .dealerIntroTable h3 {
            margin-top : 5px;
            margin-bottom : 10px;
         }

         .dealerLocator .dealerIntroTable h2 {
            font-size : 14px;
         }

         .dealerLocator .dealerIntroTable h3 {
            font-size : 12px;
         }

         .dealerLocator .selectMenu, .dealerLocator .genInput, .dealerLocator .genText {
            font-size : 10px;
         }

         .dealerLocator .genText {
            font-family : arial, helvetica, sans-serif;
         }

         .dealerLocator .dealerIntroTable .dealerIntroCell .addressInsert {
            padding-left : 10px;
         }

         .dealerLocator #mapDataPool {
            width: 608px;
            height: 300px;
            border-top : 1px solid #CCCCCC;
            border-left : 1px solid #CCCCCC;
            border-bottom : 1px solid #333333;
            border-right : 1px solid #333333;
         }

         .dealerLocator #mapDataPool #map {
            width: 606px;
            height: 298px;
            border-top : 1px solid #666666;
            border-left : 1px solid #666666;
            border-bottom : 1px solid #CCCCCC;
            border-right : 1px solid #CCCCCC;
         }

         .dealerLocator .dealerListTable {
            width: 100%;
            margin-top : 10px;
            border : 1px solid #666666;
         }

         .dealerLocator .dealerListTable .dealerListHeaderRow {
            width: 100%;
         }

         .dealerLocator .dealerListTable .dealerListHeaderCell {
            background-image : url('http://www.siliconsolar.com/ff/img/bgTableHeader.png');
            font-size : 12px;
            font-weight : bold;
            padding : 5px;
            border-right : 1px solid #666666;
            border-bottom : 1px solid #666666;
         }

         .dealerLocator .dealerListTable .dealerListListRow {

         }

         .dealerLocator .dealerListTable .dealerListListCell {
            font-size : 12px;
            padding : 5px;
            border-bottom : 1px solid #666666;
         }

         .dealerLocator .dealerListTable .dealerListListCell a {
            text-decoration : none;
         }

      </style>
<?php

      if (isset($_POST) && isset($_POST['zipcode']))
      {
         process_Dealers($_POST);
      }
      else if (isset($_GET['dealer']))
      {
         display_Dealer_Form($_GET['dealer']);
      }
      else if (isset($_GET['conf']))
      {
         display_Confirmation();
      }
      else
      {
         intro();
      }
?>

<?php

   }
   else
   {
      process_Dealer_Contact_Form($_POST);
   }
?>	

		</div><!-- #content -->
	</div><!-- #container -->

<?php include ('wp-content/themes/SunMaxxSolar/footer-no-wp.php'); ?>

</div><!-- #wrapper .hfeed -->

<div id="wrapper-bottom"></div>

</body>
</html>